import Ember from 'ember';
import CommonButton from './common-button';

export default CommonButton.extend({
  tagName: "div",
  classStatic: true,
  classNameBindings: ['classStatic:footer-nav','classStatic:col-xs-4','selected:selected'],
  menu: null,
  selected: false,
  touchStart: function(){
    this._super();
    // this.set("selected",true);
  },
  didRender() {
    console.log("didRender in,menu:",this.get("menu.code"));
    this._super(...arguments);
    if (this.get('renderAction')&&this.get("selected")) {
      var renderAction = this.get('renderAction');
      console.log("renderAction:" + renderAction);
      var _self = this;
      Ember.run.next(this,function() {
        _self.sendAction(renderAction,_self.clickActParams);
      });
    }
  },
  actions:{
    // touchStartAction: function(){
    //
    // },
    // clickAction: function(){
    //
    // }
  }
});
